import { ApiProperty } from '@nestjs/swagger'
import {
  IsNotEmpty,
  IsNumber,
  IsOptional,
  IsString,
  MaxLength
} from 'class-validator'

export class CreateAuthDto {
  @ApiProperty({ description: '角色id', example: 1 })
  @IsNotEmpty({ message: '角色id不能为空' })
  @IsNumber({}, { message: '角色id必须为数字' })
  roleId: number
  @ApiProperty({ description: '菜单id', example: '1,2' })
  @IsNotEmpty({ message: '菜单id不能为空' })
  @IsString({ message: '菜单id必须为字符串' })
  menuId: string
}
